import { cloud, default as request } from '@/framework/utils/request'

/**
 * @Description: 获取广告列表 /tMadAdSpace/page
 * @param data
 */
export function getAdvertList(data) {
  return request({
    url: `${cloud.mall}/tMadAdSpace/page`,
    method: 'get',
    params: data
  })
}

/**
 * @Description: 新增 /tMadAdSpace/add
 * @param data
 */
export function addAdvert(data) {
  return request({
    url: `${cloud.mall}/tMadAdSpace/add`,
    method: 'post',
    data
  })
}

/**
 * @Description: 修改 /tMadAdSpace/edit
 * @param data
 */
export function editAdvert(data) {
  return request({
    url: `${cloud.mall}/tMadAdSpace/edit`,
    method: 'post',
    data
  })
}

/**
 * @Description: 删除 /tMadAdSpace/delete
 * @param data
 */
export function deleteAdvert(data) {
  return request({
    url: `${cloud.mall}/tMadAdSpace/delete`,
    method: 'post',
    data
  })
}

/**
 * @Description: 广告管理列表 /tMadAd/page
 * @param data
 */
export function getAdList(data) {
  return request({
    url: `${cloud.mall}/tMadAd/page`,
    method: 'get',
    params: data
  })
}

/**
 * @Description: 新增 /tMadAd/add
 * @param data
 */
export function addAd(data) {
  return request({
    url: `${cloud.mall}/tMadAd/add`,
    method: 'post',
    data
  })
}

/**
 * @Description: 获取商品详情 /goods/getGoodsList
 * @param data
 */
export function getGoodsList(data) {
  return request({
    url: `${cloud.mall}/goods/getGoodsList`,
    method: 'get',
    params: data
  })
}

/**
 * @Description: 获取店铺 /tMallInfo/page
 * @param data
 */
export function getMyMallInfo(data) {
  return request({
    url: `${cloud.mall}/tMallInfo/page`,
    method: 'get',
    params: data
  })
}

/**
 * @Description: 修改 /tMadAd/edit
 * @param data
 */
export function editAd(data) {
  return request({
    url: `${cloud.mall}/tMadAd/edit`,
    method: 'post',
    data
  })
}

/**
 * @Description: /tMadAdSpace/getNameList
 * @param data
 */

export function getAdvertNameList(data) {
  return request({
    url: `${cloud.mall}/tMadAdSpace/getNameList`,
    method: 'get',
    params: data
  })
}

/**
 * @Description: /tMadAd/detail
 * @param data
 */
export function getAdDetail(data) {
  return request({
    url: `${cloud.mall}/tMadAd/detail`,
    method: 'get',
    params: data
  })
}

/**
 * @Description: /tMadAdSpace/detail
 * @param data
 */
export function getAdvertDetail(data) {
  return request({
    url: `${cloud.mall}/tMadAdSpace/detail`,
    method: 'get',
    params: data
  })
}

/**
 * @Description: 获取余额 /user/getAccountBalance
 * @param data
 */
export function getAccountBalance(data) {
  return request({
    url: `${cloud.mall}/user/getAccountBalance`,
    method: 'get',
    params: data
  })
}

/**
 * @Description: 删除 /tMadAd/delete
 * @param data
 */
export function deleteAd(data) {
  return request({
    url: `${cloud.mall}/tMadAd/delete`,
    method: 'post',
    data
  })
}

/**
 * @Description: 店铺 /tMallInfo/getMyMallInfo
 * @param data
 */
export function getMyMallInfoDetail(data) {
  return request({
    url: `${cloud.mall}/tMallInfo/getMyMallInfo`,
    method: 'get',
    params: data
  })
}

/**
 * @Description: 浏览记录 /tMgdView/page
 * @param data
 */
export function getBrowseRecord(data) {
  return request({
    url: `${cloud.mall}/tMgdView/page`,
    method: 'get',
    params: data
  })
}

/**
 * @Description: 新增投诉 /tModOrderComplaint/add
 * @param data
 */
export function addComplaint(data) {
  return request({
    url: `${cloud.mall}/tModOrderComplaint/add`,
    method: 'post',
    data
  })
}

/**
 * @Description: 投诉列表 /tModOrderComplaint/page
 * @param data
 */
export function getComplaintList(data) {
  return request({
    url: `${cloud.mall}/tModOrderComplaint/page`,
    method: 'get',
    params: data
  })
}

/**
 * @Description: 投诉详情 /tModOrderComplaint/detail
 * @param data
 */
export function getComplaintDetail(data) {
  return request({
    url: `${cloud.mall}/tModOrderComplaint/detail`,
    method: 'get',
    params: data
  })
}

/**
 * @Description: 取消 /tModOrderComplaint/cancel
 * @param data
 */
export function cancelComplaint(data) {
  return request({
    url: `${cloud.mall}/tModOrderComplaint/cancel`,
    method: 'post',
    data
  })
}

/**
 * @Description: 修改 /tModOrderComplaint/edit
 * @param data
 */
export function editComplaint(data) {
  return request({
    url: `${cloud.mall}/tModOrderComplaint/edit`,
    method: 'post',
    data
  })
}

/**
 * @Description: 店铺浏览 /tMallView/page
 * @param data
 */
export function getMallView(data) {
  return request({
    url: `${cloud.mall}/tMallView/page`,
    method: 'get',
    params: data
  })
}

/**
 * @Description: 新增店铺浏览 /tMallView/add
 * @param data
 */
export function addMallView(data) {
  return request({
    url: `${cloud.mall}/tMallView/add`,
    method: 'post',
    data
  })
}

/**
 * @Description: 删除商品浏览记录 /tMgdView/delete
 * @param data
 */
export function deleteGoodsView(data) {
  return request({
    url: `${cloud.mall}/tMgdView/delete`,
    method: 'post',
    data
  })
}

/**
 * @Description: 店铺删除浏览 /tMallView/delete
 * @param data
 */
export function deleteMallView(data) {
  return request({
    url: `${cloud.mall}/tMallView/delete`,
    method: 'post',
    data
  })
}

/**
 * @Description: 回复 /tModOrderComplaint/reply
 * @param data
 */
export function replyComplaint(data) {
  return request({
    url: `${cloud.mall}/tModOrderComplaint/reply`,
    method: 'post',
    data
  })
}

/**
 * @Description: 受理 /tModOrderComplaint/accept
 * @param data
 */
export function acceptComplaint(data) {
  return request({
    url: `${cloud.mall}/tModOrderComplaint/accept`,
    method: 'post',
    data
  })
}

/**
 * @Description: 处理 /tModOrderComplaint/handle
 * @param data
 */
export function handleComplaint(data) {
  return request({
    url: `${cloud.mall}/tModOrderComplaint/handle`,
    method: 'post',
    data
  })
}

/**
 * @Description: 单条使用教程 /tMallTutorial/detail
 * @param data
 */
export function getTutorialDetail(data) {
  return request({
    url: `${cloud.mall}/tMallTutorial/detail`,
    method: 'get',
    params: data
  })
}
